package com.converter.gui;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JEditorPane;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;

public class HtmlContent extends JFrame {

	private JPanel contentPane;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					HtmlContent frame = new HtmlContent();
					new HtmlContent().start();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public HtmlContent() {
		/*setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 450, 300);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		contentPane.setLayout(new BorderLayout(0, 0));
		setContentPane(contentPane);*/
	}
	
	void start()
	{
	    try
	    {
	    String html;
	    html="<html><head><title>Simple Page</title></head>";
	    html+="<body bgcolor='#777779'><hr/><font size=50>This is Html content</font><hr/>";
	    html+="</body></html>";
	    JEditorPane ed1=new JEditorPane("text/html",html);
	    ed1.setSize(50, 50);
	    add(ed1);
	    setVisible(true);
	    setSize(600,200);
	    setDefaultCloseOperation(EXIT_ON_CLOSE);
	    }
	    catch(Exception e)
	    {
	        e.printStackTrace();
	        System.out.println("Some problem has occured"+e.getMessage());
	    }
	}

}
